<?php
/**
 * PHP.aide + YEAP project
 * Abstract Accessor
 *
 * GPL v.2
 * (cc) VS aka Virtual Stalker, 2009
 * call@2128506.su
 *
 * энжой! =;)
 * */

//include_once 'SQLConstructor.class.php';
include_once CLASS_PATH.'/CRUD.intrf.php';

abstract class Accessor implements CRUD//extends aSQLConstructor
{
	protected $driver = null;

	final function	__construct($driver = null)
	{
		$this->driver = $driver;
		$this->init();
	}
	/**
	 * секция инициализации
	 * */
	abstract function init();
	/**
	 *
	 *	*/
	abstract function run(/*$sql=null,$data=null надо ли??? */);

	public function __call($method,$args)
	{
		if (method_exists($this->driver,$method))
			return call_user_func_array(array($this->driver,$method),$args);
		else
			return null;
	}

	public function & create($instance=null){}
	public function & read($criteria){}
	public function update(){}
	public function delete($criteria){}


}
?>